package com.qqt.csr.archive.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qqt.csr.archive.entity.reader.SmartConversation;
import com.qqt.csr.archive.mapper.SmartConversationMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * @Author: yang hao
 * @Date: 2024/11/19 16:21
 * @Description: 智能客服 会话服务
 **/
@Slf4j
@Service
public class SmartConversationService extends ServiceImpl<SmartConversationMapper, SmartConversation> {

    /**
     * 根据会话id集合查询会话集合
     * @param ids {@link List<String>} 会话id集合
     * @return {@link List<SmartConversation>} 会话集合
     */
    public List<SmartConversation> getByIds(List<String> ids) {
        if (ids == null || ids.isEmpty()) {
            return Collections.emptyList();
        }
        return this.baseMapper.selectBatchIds(ids);
    }

}
